<?php
$dis_id=3;
include("../../inc/conn.inc");
include("../islogin2.php");
$url="zhaobiao.php";
$thepage=$_GET['page']?$_GET['page']:1;
$maxpage=15;
if($_GET['del_act']){
$urls=$_SERVER['HTTP_REFERER'];
 //@mysql_query("delete from news where member_id='".$_COOKIE['user_id']."' and id='".$_GET['del_id']."'");
//
 echo "<script>location='".$urls."'</script>";
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>会员中心-三帝贸易网</title>
<link href="../css/css.css" rel="stylesheet" type="text/css" />
</head>
<script type="text/javascript" src="../js/left.js"></script>
<body>
<div id="mian">
<?php include("../inc/top.php");?>
<div class="top1"><span>您当前位置：<a href="../index.php" class="dh">会员助手</a> &gt;&gt; 招标 &gt;&gt; 招标管理</span></div>
<div class="left">
<?php include("../inc/left.php");?>
</div>
<div class="right">
<TABLE cellSpacing="0" cellPadding="0" width="100%" border="0">
   <TR>
     <TD height="40" bgcolor="#EFF6FF" style="font-size:18px;font-weight:bold;padding-left:8px;">招标管理</TD>
   </TR>
</TABLE>
<br>
<br>
<br>
<table width="100%" cellspacing="1" bgcolor="#C1DCF5">
        <tr>
          <td width="5%" height="30" align="center" bgcolor="#EFF6FF">编号</td>
          <td width="25%" align="center" bgcolor="#EFF6FF">标题</td>
          <td width="30%" align="center" bgcolor="#EFF6FF">目录</td>
          <td width="15%" align="center" bgcolor="#EFF6FF">更新时间</td>
          <td width="10%" align="center" bgcolor="#EFF6FF">状态</td>
          <td width="15%" align="center" bgcolor="#EFF6FF"><a href="add_zb.php">发布招标</a></td>
        </tr>
<?php
$sql="select id,news_title,type_name2,news_time,n_sh from news where member_id='".$_COOKIE['user_id']."' and type_id=1 order by id desc limit ".($thepage-1)*$maxpage.",$maxpage";
$rs=mysql_query($sql);
$i=1;
while($row=mysql_fetch_array($rs)){
?>
        <tr>
          <td height="22" align="center" bgcolor="#FFFFFF"><?=$i?></td>
          <td align="center" bgcolor="#FFFFFF"><?=$row[news_title]?></td>
          <td align="center" bgcolor="#FFFFFF"><?=$row[type_name2]?></td>
          <td align="center" bgcolor="#FFFFFF"><?php if($row[news_time]>=date("Y-m-d")){?><font color="#FF0000"><?=date("Y-m-d",strtotime($row[news_time]))?></font><?php }else{?><?=date("Y-m-d",strtotime($row[news_time]))?><?php }?></td>
          <td align="center" bgcolor="#FFFFFF"><?php if($row[n_sh]==1){echo "正常";}else{echo "<font color='red'>处理中</font>";}?></td>
          <td align="center" bgcolor="#FFFFFF"><a href="zb_edit.php?xg_id=<?=$row['id']?>">修改</a></td>
        </tr>
<?php
$i++;
}?>
<?php
$rs2=@mysql_query("select count(id) from news where member_id='".$_COOKIE['user_id']."' and type_id=1");
$totalrecord=@mysql_result($rs2,0);
@mysql_free_result($rs2);
$totalpage=ceil($totalrecord/$maxpage);
if($totalpage>0){
?>
        <tr>
          <td colspan="6" align="center" bgcolor="#FFFFFF" height="18"><script language="javascript">
<!--
function showPageLink(sUrl,iPage,iCount){
	var i;
	i=Math.max(1,iPage-1);
	document.write("<a href=\"" + sUrl + "1\">«</a> ");
	document.write("<a href=\"" + sUrl + i + "\">上一页</a> ");
	for(i=Math.max(1,iPage-8);i<iPage;i++){
		document.write("<a href=\""+sUrl + i + "\"><b>" + i + "</b></a> ");
	}
	document.write("<font color='#ff3333'><b>" + iPage + "</b></font> ");
	for(i=iPage+1;i<=Math.min(iCount,iPage+8);i++){
		document.write("<a href=\""+sUrl + i + "\"><b>" + i + "</b></a> ");
	}
	i=Math.min(iCount,iPage+1);
	if(iCount>iPage+8) document.write("<span style='font-size:8px'>···</span> ");
	document.write("<a href=\"" + sUrl + i + "\">下一页</a> ");
	document.write("<a href=\"" + sUrl + iCount + "\">»</a> ");
}
showPageLink("<?=$url?>?page=",<?=$thepage?>,<?=$totalpage?>);
//-->
</script></td>
        </tr><?php }?>
    </table>
	<br>
</div>
<div class="onl"></div>
<?php include("../inc/foot.php");
?>
</div>
</body>
</html>
<script language="javascript">
function del(){
if(confirm("禁止删除!"))
return true;
else
return false;
}
</script>